import service from '../utils/request'

export function fetchPostList (params) {
  return service({
    url: '/position',
    method: 'get',
    params
  })
}

export function fetchPostByName (params) {
  return service({
    url: '/position/get',
    method: 'get',
    params
  })
}

export function addPost (data) {
  return service({
    url: '/position',
    method: 'post',
    data
  })
}

export function editPost (data) {
  return service({
    url: '/position',
    method: 'put',
    data
  })
}

export function deletePost (params) {
  return service({
    url: '/position',
    method: 'delete',
    params
  })
}
